home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17731 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: newsserver.trl.OZ.AU!usenet
  2. From: davej@apertus.com
  3. Newsgroups: rec.games.programmer,comp.programming,comp.lang.c++,alt.msdos.programmer
  4. Subject: Re: Young programmers read me.
  5. Date: Wed, 17 Apr 96 12:52:08 EDT
  6. Organization: Telecom Research Laboratories, Melbourne, Australia.
  7. Message-ID: <4l1n31$636@newsserver.trl.OZ.AU>
  8. References: <4l0c8p$rvp@fountain.mindlink.net>
  9. NNTP-Posting-Host: 172.17.4.125
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=US-ASCII
  12. X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
  13.  
  14.  
  15. In article <4l0c8p$rvp@fountain.mindlink.net>, <genew@mindlink.bc.ca> writes:
  16. > hennebry@plains.nodak.edu (Michael J. Hennebry) wrote:
  17. > >In article <4kmfqn$e0f@airdmhor.gen.nz>,
  18. > >Simon Hosie <gumboot@airdmhor.gen.nz> wrote:
  19. > >>    if(something_happened)
  20. > >>        do_something_else();
  21. > >AAAaaarrrggg! This is an accident waiting to happen.
  22.  
  23. Agreed.
  24.  
  25. >      Why?  If you don't know the language, why program in it?
  26.  
  27. That's not much of an answer!
  28.  
  29. > I always indent my code properly (meaning consistently) and if I
  30. > saw that the then clause needed to be "blockized", I'd do it automatically.  
  31.  
  32. You may "always indent your code properly" but what about when you are
  33. working on a large project with 6 or 20 other engineers?   Have you
  34. ever worked on a project where you share development code with others?
  35. What if the company you work for has standards that don't allow your
  36. method?
  37.  
  38. IMO, if you're relying on indentation to indicate program flow, you're
  39. just asking for trouble, and lots of it.
  40.  
  41. > >Lotsa luck.
  42. >      I don't need luck.  I have a method.
  43.  
  44. What about when you leave the company?   Then every bit of code you
  45. had ever written or were maintaining would be riddled with accidents
  46. waiting to happen.   Think ahead, it's not always what we want to do
  47. as programmers, but code MUST be written in a fashion that it will be
  48. easily maintainable by junior level programmers.   I don't really like 
  49. that either, being forced to "code down" but it's a fact that code 
  50. will have bugs and must be maintained.   Often it's not the sr engineers 
  51. doing that sort of work.
  52.  
  53. > >or this:
  54. > >       if(something_happened)
  55. > >       {   do_something_else(); }
  56. >      Extraneous braces cause pause.
  57.        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  58. ???
  59.  
  60. Dave Johnson
  61.